<form id="frmAssign" name="frmAssign" method="POST" action="<?php echo $this->url(array('controller'=>'group','action'=>'updateforaction') ,'default', true);?>">
	<table class='tbl_view'>
		<tr>
			<td width='200px'>
				Chọn thao tác cần phân quyền cho nhóm			
			</td>
			<td>
				<select style='width: 100%' id="cboAction" name="cboAction" onchange="ajaxpage('<?php echo $this->url(array('controller'=>'group','action'=>'ajax'),'default',true);?>' + '/id_action/' + this.value,'list')">
				<?php 
					foreach ($this->list_action as $key => $value)
					{
						$se = $this->id_action == $key ? "selected='selected'" : "";						
						echo "<option value='$key' $se>$value</option>";
					}
				?>
				</select>
			</td>
		</tr>
		<tr>
			<td id='list' style='padding: 0px' colspan='2'></td>
		</tr>	
		<tr>
			<td align="right" colspan="2">			
				<input type='submit' value='Cấp quyền'></input>
				<input type='button' value='Trả về giá trị cũ' onclick="document.getElementById('cboAction').onchange()"></input>
			</td>
		</tr>	
	</table>
</form>

	

<script>
	 document.getElementById('cboAction').onchange();
	
	function CheckAll(obj)
	{
		list_tag = document.getElementsByTagName("input");

		for (i=0; i<list_tag.length; i++)
		{
			tag = list_tag[i];
			tag.checked = obj.checked;
		}
	}
</script>